<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.1">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"bamboowine.gitee.io","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="图&#x2F;Dijsktra算法&#x2F;Floyd算法">
<meta property="og:type" content="article">
<meta property="og:title" content="最短路径">
<meta property="og:url" content="https://bamboowine.gitee.io/2021/08/22/leetcode/%E6%9C%80%E7%9F%AD%E8%B7%AF%E5%BE%84/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="图&#x2F;Dijsktra算法&#x2F;Floyd算法">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://gitee.com/BambooWine/MyPhotos/raw/master/img/image-20210821225348624.png">
<meta property="og:image" content="https://gitee.com/BambooWine/MyPhotos/raw/master/img/image-20210821162441971.png">
<meta property="article:published_time" content="2021-08-22T07:04:28.000Z">
<meta property="article:modified_time" content="2021-08-22T09:23:18.556Z">
<meta property="article:author" content="John Doe">
<meta property="article:tag" content="图&#x2F;最短路径">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://gitee.com/BambooWine/MyPhotos/raw/master/img/image-20210821225348624.png">

<link rel="canonical" href="https://bamboowine.gitee.io/2021/08/22/leetcode/%E6%9C%80%E7%9F%AD%E8%B7%AF%E5%BE%84/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>最短路径 | Hexo</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      
      <!-- 修改title -->
      <h1 class="site-title"> BambooWine's Notes </h1>
      <p class="site-subtitle" style="opacity: 1; top: 0px;">努力吧, 朋友~</p>
      <!-- <h1 class="site-title">Hexo</h1> -->

      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://bamboowine.gitee.io/2021/08/22/leetcode/%E6%9C%80%E7%9F%AD%E8%B7%AF%E5%BE%84/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="John Doe">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Hexo">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          最短路径
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              

              <time title="创建时间：2021-08-22 15:04:28 / 修改时间：17:23:18" itemprop="dateCreated datePublished" datetime="2021-08-22T15:04:28+08:00">2021-08-22</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E7%AE%97%E6%B3%95/" itemprop="url" rel="index"><span itemprop="name">算法</span></a>
                </span>
            </span>

          
            <div class="post-description">图/Dijsktra算法/Floyd算法</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="求解最短路径"><a href="#求解最短路径" class="headerlink" title="求解最短路径"></a>求解最短路径</h1><h2 id="1-Dijsktra算法"><a href="#1-Dijsktra算法" class="headerlink" title="1. Dijsktra算法"></a>1. Dijsktra算法</h2><h3 id="1-1-Dijsktra算法解析"><a href="#1-1-Dijsktra算法解析" class="headerlink" title="1.1 Dijsktra算法解析"></a>1.1 Dijsktra算法解析</h3><p><img src="https://gitee.com/BambooWine/MyPhotos/raw/master/img/image-20210821225348624.png" alt="image-20210821225348624"></p>
<p>上图就是Dijsktra算法的求解元素，左部分是五个地点，求解V0到其他所有节点的最短距离；右部分是求解Dijsktra算法的重要元素：<strong>inal数组表示当前节点是否已经找到最短路径、dist数组表示V0到当前节点的目前求解的最短距离、path数组表示当前节点的前驱节点</strong></p>
<p><strong>算法步骤：</strong></p>
<ul>
<li>首先dist[0] = 0，即从V0点出发，而其余元素设置为MAX</li>
<li>从final元素为false的节点中找到dist最小的节点，认定该节点的最短距离已经找到，将该节点的final设置为true，同时更新与该节点想连的其他节点的最短距离</li>
<li>不断重复上一步，直到所有节点的final值均为true<strong>（以下是算法步骤图解）</strong></li>
</ul>
<iframe height=498 width=510 src='https://player.youku.com/embed/XNTE5NjMzOTQwOA==' frameborder=0 'allowfullscreen'></iframe>

<h3 id="1-2-Dijsktra代码"><a href="#1-2-Dijsktra代码" class="headerlink" title="1.2 Dijsktra代码"></a>1.2 Dijsktra代码</h3><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> <span class="keyword">int</span> MAX = <span class="number">20000</span>;</span><br><span class="line"><span class="function"><span class="built_in">vector</span>&lt;<span class="keyword">int</span>&gt; <span class="title">dijsktra</span><span class="params">(<span class="built_in">vector</span>&lt;<span class="built_in">vector</span>&lt;<span class="keyword">int</span>&gt;&gt;&amp; graph, <span class="keyword">int</span> n, <span class="keyword">int</span> k)</span> </span>&#123;</span><br><span class="line">	<span class="function"><span class="built_in">vector</span>&lt;<span class="keyword">int</span>&gt; <span class="title">dist</span><span class="params">(n + <span class="number">1</span>, MAX)</span></span>; dist[k] = <span class="number">0</span>;</span><br><span class="line">	<span class="comment">// final 是否找到最短路径</span></span><br><span class="line">	<span class="function"><span class="built_in">vector</span>&lt;<span class="keyword">bool</span>&gt; <span class="title">final</span><span class="params">(n + <span class="number">1</span>, <span class="literal">false</span>)</span></span>;</span><br><span class="line">	<span class="comment">// 总共需要进行 n 轮 </span></span><br><span class="line">	<span class="keyword">for</span> (<span class="keyword">int</span> i = <span class="number">1</span>; i &lt;= n; ++i) &#123;</span><br><span class="line">		<span class="keyword">int</span> minId = <span class="number">0</span>, minDist = MAX; <span class="comment">// 在未找到最短路径的节点中找出目前最短路径的节点</span></span><br><span class="line">		<span class="keyword">for</span> (<span class="keyword">int</span> j = <span class="number">1</span>; j &lt;= n; ++j) &#123;</span><br><span class="line">			<span class="keyword">if</span> (!<span class="keyword">final</span>[j] &amp;&amp; dist[j] &lt; minDist) &#123;</span><br><span class="line">				minId = j; minDist = dist[j];</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;</span><br><span class="line">		<span class="comment">// 更新和minId节点相连的所有节点路径长度</span></span><br><span class="line">		<span class="keyword">final</span>[minId] = <span class="literal">true</span>;</span><br><span class="line">		<span class="keyword">for</span> (<span class="keyword">int</span> j = <span class="number">1</span>; j &lt;= n; ++j) &#123;</span><br><span class="line">			dist[j] = <span class="built_in">min</span>(dist[j], dist[minId] + graph[minId][j]);</span><br><span class="line">		&#125;</span><br><span class="line">	&#125;</span><br><span class="line">	<span class="keyword">return</span> dist;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h3 id="1-3-例题"><a href="#1-3-例题" class="headerlink" title="1.3 例题"></a>1.3 例题</h3><p><strong><a href="https://leetcode-cn.com/problems/network-delay-time/" target="_blank" rel="noopener">题目链接</a></strong></p>
<p><img src="https://gitee.com/BambooWine/MyPhotos/raw/master/img/image-20210821162441971.png" alt="image-20210821162441971"></p>
<h4 id="1-3-1-题目解析"><a href="#1-3-1-题目解析" class="headerlink" title="1.3.1 题目解析"></a>1.3.1 题目解析</h4><p>题目很简单，就是<strong>求节点k到所有节点的最小距离，返回其中的最大值；若存在无法到达的节点，则返回-1</strong></p>
<h4 id="1-3-2-代码"><a href="#1-3-2-代码" class="headerlink" title="1.3.2 代码"></a>1.3.2 代码</h4><figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">Solution</span> &#123;</span></span><br><span class="line"><span class="keyword">public</span>:</span><br><span class="line">    <span class="function"><span class="keyword">int</span> <span class="title">networkDelayTime</span><span class="params">(<span class="built_in">vector</span>&lt;<span class="built_in">vector</span>&lt;<span class="keyword">int</span>&gt;&gt;&amp; times, <span class="keyword">int</span> n, <span class="keyword">int</span> k)</span> </span>&#123;</span><br><span class="line">        <span class="keyword">const</span> <span class="keyword">int</span> MAX = <span class="number">20000</span>;</span><br><span class="line">        <span class="function"><span class="built_in">vector</span>&lt;<span class="keyword">int</span>&gt; <span class="title">dist</span><span class="params">(n + <span class="number">1</span>, MAX)</span></span>; dist[k] = <span class="number">0</span>;</span><br><span class="line">        <span class="function"><span class="built_in">vector</span>&lt;<span class="built_in">vector</span>&lt;<span class="keyword">int</span>&gt;&gt; <span class="title">graph</span><span class="params">(n + <span class="number">1</span>, <span class="built_in">vector</span>&lt;<span class="keyword">int</span>&gt;(n + <span class="number">1</span>, MAX))</span></span>;</span><br><span class="line">        <span class="keyword">for</span>(<span class="keyword">auto</span>&amp; t : times) graph[t[<span class="number">0</span>]][t[<span class="number">1</span>]] = t[<span class="number">2</span>];</span><br><span class="line">        <span class="comment">// final 是否找到最短路径</span></span><br><span class="line">        <span class="function"><span class="built_in">vector</span>&lt;<span class="keyword">bool</span>&gt; <span class="title">final</span><span class="params">(n + <span class="number">1</span>, <span class="literal">false</span>)</span></span>; </span><br><span class="line">        <span class="comment">// 总共需要进行 n 轮 </span></span><br><span class="line">        <span class="keyword">for</span>(<span class="keyword">int</span> i = <span class="number">1</span>; i &lt;= n; ++i)&#123;</span><br><span class="line">            <span class="keyword">int</span> minId = <span class="number">0</span>, minDist = MAX; <span class="comment">// 在未找到最短路径的节点中找出目前最短路径的节点</span></span><br><span class="line">            <span class="keyword">for</span>(<span class="keyword">int</span> j = <span class="number">1</span>; j &lt;= n; ++j)&#123;</span><br><span class="line">                <span class="keyword">if</span>(!<span class="keyword">final</span>[j] &amp;&amp; dist[j] &lt; minDist) &#123;</span><br><span class="line">                    minId = j; minDist = dist[j];</span><br><span class="line">                &#125;</span><br><span class="line">            &#125;</span><br><span class="line">            <span class="comment">// 更新和minId节点相连的所有节点路径长度</span></span><br><span class="line">            <span class="keyword">final</span>[minId] = <span class="literal">true</span>;</span><br><span class="line">            <span class="keyword">for</span>(<span class="keyword">int</span> j = <span class="number">1</span>; j &lt;= n; ++j)&#123;</span><br><span class="line">                dist[j] = <span class="built_in">min</span>(dist[j], dist[minId] + graph[minId][j]);</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">int</span> res = <span class="number">0</span>;</span><br><span class="line">        <span class="keyword">for</span>(<span class="keyword">int</span> i = <span class="number">1</span>; i &lt;= n; ++i)&#123;</span><br><span class="line">            <span class="keyword">if</span>(dist[i] == MAX) <span class="keyword">return</span> <span class="number">-1</span>;</span><br><span class="line">            res = <span class="built_in">max</span>(res, dist[i]);</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="keyword">return</span> res;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>

<h2 id="2-Floyd算法"><a href="#2-Floyd算法" class="headerlink" title="2. Floyd算法"></a>2. Floyd算法</h2><p>dp思想：以每一个节点为中转点，求最短距离</p>
<figure class="highlight c++"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">void</span> <span class="title">floyd</span><span class="params">()</span></span>&#123;</span><br><span class="line">    <span class="comment">// A 邻接矩阵</span></span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">int</span> p = <span class="number">1</span>; p &lt;= n; ++p) &#123;</span><br><span class="line">		<span class="keyword">for</span> (<span class="keyword">int</span> i = <span class="number">1</span>; i &lt;= n; ++i) &#123;</span><br><span class="line">			<span class="keyword">for</span> (<span class="keyword">int</span> j = <span class="number">1</span>; j &lt;= n; ++j) &#123;</span><br><span class="line">				<span class="keyword">if</span> (A[i][j] &gt; (A[i][p] + A[p][j])) &#123;</span><br><span class="line">					A[i][j] = A[i][p] + A[p][j];</span><br><span class="line">				&#125;</span><br><span class="line">			&#125;</span><br><span class="line">		&#125;</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>


    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/%E5%9B%BE-%E6%9C%80%E7%9F%AD%E8%B7%AF%E5%BE%84/" rel="tag"># 图/最短路径</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2021/08/08/leetcode/%E5%88%A0%E9%99%A4BST%E8%8A%82%E7%82%B9/" rel="prev" title="删除BST的节点">
      <i class="fa fa-chevron-left"></i> 删除BST的节点
    </a></div>
      <div class="post-nav-item">
    <a href="/2022/01/09/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/%E7%BA%BF%E6%80%A7%E5%88%A4%E5%88%AB%E6%B3%95/" rel="next" title="线性判别分析LDA">
      线性判别分析LDA <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#求解最短路径"><span class="nav-number">1.</span> <span class="nav-text">求解最短路径</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-Dijsktra算法"><span class="nav-number">1.1.</span> <span class="nav-text">1. Dijsktra算法</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-1-Dijsktra算法解析"><span class="nav-number">1.1.1.</span> <span class="nav-text">1.1 Dijsktra算法解析</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-2-Dijsktra代码"><span class="nav-number">1.1.2.</span> <span class="nav-text">1.2 Dijsktra代码</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-3-例题"><span class="nav-number">1.1.3.</span> <span class="nav-text">1.3 例题</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-3-1-题目解析"><span class="nav-number">1.1.3.1.</span> <span class="nav-text">1.3.1 题目解析</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#1-3-2-代码"><span class="nav-number">1.1.3.2.</span> <span class="nav-text">1.3.2 代码</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-Floyd算法"><span class="nav-number">1.2.</span> <span class="nav-text">2. Floyd算法</span></a></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt=" BambooWine "
      src="/images/avatar.jpg">

  <!-- 修改作者 -->
  <p class="site-author-name" itemprop="name"> BambooWine </p>
  <!-- <p class="site-author-name" itemprop="name">John Doe</p> -->

  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">21</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
        <span class="site-state-item-count">2</span>
        <span class="site-state-item-name">分类</span>
      </div>
      <div class="site-state-item site-state-tags">
        <span class="site-state-item-count">6</span>
        <span class="site-state-item-name">标签</span>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  
  <span class="author" itemprop="copyrightHolder">BambooWine</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  

</body>
</html>
